//
//  NSDateAdditions.h
//  Tint
//
//  Created by Kevin Wu on 2/22/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (Tint)

/*
 * Date components
 */
- (NSDateComponents *)dateComponents;

/*
 * Adjusting
 */
- (NSDate *)startDateOfDay;
- (NSDate *)noonDateOfDay;

- (NSDate *)newDateByAddingSeconds:(NSUInteger)seconds;
- (NSDate *)newDateByAddingMinutes:(NSUInteger)minutes;
- (NSDate *)newDateByAddingHours:(NSUInteger)hours;
- (NSDate *)newDateByAddingDays:(NSUInteger)days;

- (NSDate *)newDateBySubtractingSeconds:(NSUInteger)seconds;
- (NSDate *)newDateBySubtractingMinutes:(NSUInteger)minutes;
- (NSDate *)newDateBySubtractingHours:(NSUInteger)hours;
- (NSDate *)newDateBySubtractingDays:(NSUInteger)days;

/*
 * Comparing
 */
- (BOOL)isEarlierThanDate:(NSDate *)date;
- (BOOL)isLaterThanDate:(NSDate *)date;

- (BOOL)isSameYearAsDate:(NSDate *)date;
- (BOOL)isSameMonthAsDate:(NSDate *)date;
- (BOOL)isSameDayAsDate:(NSDate *)date;
- (BOOL)isSameWeekAsDate:(NSDate *)date;

@end
